package com.klb.service.admin.impl;

import com.klb.dao.impl.BlockDaoImpl;
import com.klb.model.BbsBlock;
import com.klb.service.admin.BlockServiceAdmin;
import com.klb.tools.Tools;

/**
 * Created by fujia on 2016/7/6.
 */
public class BlockServiceAdminImpl implements BlockServiceAdmin {
    private BlockDaoImpl blockDao;

    public void setBlockDao(BlockDaoImpl blockDao) {
        this.blockDao = blockDao;
    }
    

    @Override
    public String getTitleById(int blockId) {
        BbsBlock block = this.blockDao.getBlockById(blockId);
        if (!Tools.objectIsNullOrNot(block)){
            return block.getTitle();
        }

        return null;
    }

    
}
